#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;
int main1()
{
    enum color { red, yellow, blue };
    int temp, i, j;
    for (i = red; i <= yellow; i++)
    {
        for (j = i + 1; j <= blue; j++)
        {
            for (int t = 0; t < 2; t++)
            {
                switch (t)
                {
                case 0:temp = i; break;
                case 1:temp = j; break;
                }
                switch ((enum color)temp)
                {
                case red: cout << "red" << "\t"; break;
                case yellow: cout << "yellow" << "\t"; break;
                case blue: cout << "blue" << "\t"; break;
                }

            }
            cout << "\n";
        }
    }
    return 0;
}

int main2()
{
    char mima[20];
    cin.getline(mima, 20);
    int i = 0;
    while (mima[i] != '\0')
    {
        if ((mima[i] >= 'a') && (mima[i] <= 'z'))
        {
            mima[i] = (mima[i] - 32 + 3 - 'A') % 26 + 'A';
        }
        else if ((mima[i] >= 'A') && (mima[i] <= 'Z'))
        {
            mima[i] = (mima[i] + 32 + 3 - 'a') % 26 + 'a';
        }

        i++;
    }
    mima[i] = '\0';
    cout << mima << endl;
    return 0;
}

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    char m;
    cin >> m;
    if ((m >= 'A') && (m <= 'Z'))
    {
        if (m == 'A')
            cout << "ZAB" << endl;
        else if (m == 'Z')
            cout << "YZA" << endl;
        else
            cout << char(m - 1) << char(m) << char(m + 1) << endl;
    }
    else if ((m >= 'a') && (m <= 'z'))
    {
        if (m == 'a')
            cout << "zab" << endl;
        else if (m == 'z')
            cout << "yza" << endl;
        else
            cout << char(m - 1) << char(m) << char(m + 1) << endl;
    }
    else
        cout << "error" << endl;
}



